#ifndef EMAILINFOR_H
#define EMAILINFOR_H

#include <QObject>
#include <mutex>
#include <QQueue>
#include <QPair>
#include "mytypes.h"
class EmailInfor final:public QObject
{
    Q_OBJECT
public:
    static EmailInfor* GetInstance(QObject* parent=nullptr);
    virtual ~EmailInfor();


    void SubmitInfor(Yzty::ITEMCODE mcode,QVector<Yzty::BaceInfor*>& infors);

    const QVector<Yzty::BaceInfor*>& GetItemInfor(Yzty::ITEMCODE);
private:
    explicit EmailInfor(QObject* parent=nullptr);
    static EmailInfor* _instance;


private:
    std::mutex      _mutex;
    QVector<QVector<Yzty::BaceInfor*>>                      _infors;
};

#endif // EMAILINFOR_H
